﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DepartmentMaster.Master" AutoEventWireup="true"
    CodeBehind="Details.aspx.cs" Inherits="Department.Details" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="ContentHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="ContentMain" ContentPlaceHolderID="DynamicContent" runat="server">
    <asp:Panel ID="DetailsPanel" runat="server" Visible="False">
        <%--Lecturer Details Repeater--%>
        <asp:Repeater ID="RepeaterLecturers" runat="server">
            <headertemplate>
                <table>
            </headertemplate>
            <itemtemplate>
                <tr>
                    <td rowspan="7">
                        <img alt="Снимка на преподавател" src='<%# Eval("PictureLink") %>' title='<%# DataBinder.Eval(Container.DataItem, "Name")%>'
                            runat="server" />
                    </td>
                    <td>
                        <h2>
                            <%# DataBinder.Eval(Container.DataItem, "Name")%></h2>
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong><asp:Label ID="LecturerTitle" CssClass="date" runat="server" Text='<%# Eval("DegreeName")+" "+Eval("RankName")%>' /></strong>
                    </td>
                </tr>
                <tr>
                    <td>
                        Кабинет:<%# DataBinder.Eval(Container.DataItem, "Office")%></td>
                </tr>
                <tr>
                    <td>
                        Телефон:
                        <%# DataBinder.Eval(Container.DataItem, "Phone")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        Е-майл:
                        <asp:HyperLink ID="email" runat="server" Text='<%#Eval("Email")%>'></asp:HyperLink>
                    </td>
                </tr>
                <tr>
                    <td>
                        Лична страница:
                        <asp:HyperLink ID="personalHomePage" runat="server" Text='<%#Eval("PersonalHomePage")%>'></asp:HyperLink>
                    </td>
                </tr>
                <tr>
                    <td>
                        Интереси:
                        <%# DataBinder.Eval(Container.DataItem, "Info")%>
                    </td>
                </tr>
            </itemtemplate>
            <footertemplate>
                </table>
            </footertemplate>
        </asp:Repeater>
        <%--News Details Repeater--%>
        <asp:Repeater ID="RepeaterNews" runat="server">
            <headertemplate>
                <table>
            </headertemplate>
            <itemtemplate>
                <tr>
                    <td>
                        <h2>
                            <%# DataBinder.Eval(Container.DataItem, "Heading")%></h2>
                    </td>
                </tr>
                <tr>
                    <td class="date">
                        <%# DataBinder.Eval(Container.DataItem, "Date", "{0:D}")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%# DataBinder.Eval(Container.DataItem, "Text")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Repeater ID="RepeaterDocForNews" runat="server">
                            <ItemTemplate>
                                <asp:HyperLink ID="LinkDocForEvent" runat="server" Text='<%#Eval("DocName")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "DocDesc")%>'
                                    runat="server" NavigateUrl='<%# Eval("Link") %>'>
                                </asp:HyperLink><br />
                                <asp:Label ID="Label" runat="server" Text='<%#Eval("DocDesc")%>'>
                                </asp:Label>
                            </ItemTemplate>
                        </asp:Repeater>
                    </td>
                </tr>
            </itemtemplate>
            <footertemplate>
                </table>
            </footertemplate>
        </asp:Repeater>
        <%--Discipline Details Repeater--%>
        <asp:Repeater ID="RepeaterDisc" runat="server">
            <headertemplate>
                <table>
            </headertemplate>
            <itemtemplate>
                <tr>
                    <td>
                        <h2>
                            <%# DataBinder.Eval(Container.DataItem, "Name")%></h2>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%# DataBinder.Eval(Container.DataItem, "Description")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        Титуляр:
                        <br />
                        <asp:Repeater ID="RepeaterDiscLecturer" runat="server">
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLinkLecturer" runat="server" Text='<%#Eval("LecturerName")%>'
                                    NavigateUrl='<%#"Details.aspx?id=" + DataBinder.Eval(Container.DataItem,"LecturerID")+ "&type=" + DataBinder.Eval(Container.DataItem,"Type")%>'>
                                </asp:HyperLink><br />
                            </ItemTemplate>
                        </asp:Repeater>
                    </td>
                </tr>
            </itemtemplate>
            <footertemplate>
                </table>
            </footertemplate>
        </asp:Repeater>
        <%--Event Details DataList--%>
        <asp:Repeater ID="RepeaterEvent" runat="server">
            <headertemplate>
                <table>
            </headertemplate>
            <itemtemplate>
                <tr>
                    <td>
                        <h2>
                            <%# DataBinder.Eval(Container.DataItem, "Name")%></h2>
                    </td>
                </tr>
                <tr>
                    <td class="date">
                        <%# DataBinder.Eval(Container.DataItem, "EventDate", "{0:D}")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%# DataBinder.Eval(Container.DataItem, "Description")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Repeater ID="RepeaterDocForEvent" runat="server">
                            <ItemTemplate>
                                <asp:HyperLink ID="LinkDocForEvent" runat="server" Text='<%#Eval("DocName")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "DocDesc")%>'
                                    runat="server" NavigateUrl='<%# Eval("Link") %>'>
                                </asp:HyperLink><br />
                                <asp:Label ID="Label" runat="server" Text='<%#Eval("DocDesc")%>'>
                                </asp:Label>
                            </ItemTemplate>
                        </asp:Repeater>
                    </td>
                </tr>
            </itemtemplate>
            <footertemplate>
                </table>
            </footertemplate>
        </asp:Repeater>
        <%--Educatoin Materials Details Repeater--%>
        <h2>
            <asp:Label ID="LabelDsicEdu" runat="server"></asp:Label></h2>
        <asp:Repeater ID="RepeaterEduYear" runat="server">
            <itemtemplate>
                <asp:LinkButton ID="BtnYear" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Year")%>' OnCommand="BtnYear_Command" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Year")%>'></asp:LinkButton>
                    <ul>
                        <asp:UpdatePanel runat="server" ID="UpMaterials" UpdateMode="Conditional">
                            <contenttemplate>
                                <asp:Repeater ID="RepeaterEduM" runat="server">
                                    <itemtemplate>
                                        <li><asp:LinkButton ID="BtnEmType" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "emType")%>' OnCommand="BtnEmType_Command" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "emType")%>'></asp:LinkButton></li>
                                            <ul>
                                                <asp:UpdatePanel runat="server" ID="UpMaterials" UpdateMode="Conditional">
                                                    <contenttemplate>
                                                     <asp:Repeater ID="RepeaterLinkEdu" runat="server">
                                                            <itemtemplate>
                                                                <li><asp:HyperLink ID="LinkEduM" Text='<%# Eval("Name") %>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "DocDesc")%>'
                                                                    runat="server" NavigateUrl='<%# Eval("Link") %>'></asp:HyperLink></li>
                                                            </itemtemplate>
                                                    </asp:Repeater>
                                                </contenttemplate>
                                                <triggers>
                                                    <asp:AsyncPostBackTrigger ControlID="BtnEmType" EventName="Command" />
                                                </triggers>
                                            </asp:UpdatePanel></ul>
                                    </itemtemplate>
                                </asp:Repeater>
                            </contenttemplate>
                        <triggers>
                            <asp:AsyncPostBackTrigger ControlID="BtnYear" EventName="Command" />
                        </triggers>
                    </asp:UpdatePanel>
                    </ul>
            </itemtemplate>
        </asp:Repeater>
        <%--Dynamic Content Details Repeater--%>
        <asp:Repeater ID="RepeaterDynamicContent" runat="server">
            <headertemplate>
                <table>
            </headertemplate>
            <itemtemplate>
                <tr>
                    <td>
                        <h2>
                            <%# DataBinder.Eval(Container.DataItem, "Name")%></h2>
                    </td>
                </tr>
                <tr>
                    <td class="date">
                        <%# DataBinder.Eval(Container.DataItem, "Date", "{0:D}")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%# DataBinder.Eval(Container.DataItem, "Text")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Repeater ID="RepeaterDocForDynCnt" runat="server">
                            <ItemTemplate>
                                <asp:HyperLink ID="LinkDocForEvent" runat="server" Text='<%#Eval("DocName")%>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "DocDesc")%>'
                                    runat="server" NavigateUrl='<%# Eval("Link") %>'>
                                </asp:HyperLink><br />
                                <asp:Label ID="Label" runat="server" Text='<%#Eval("DocDesc")%>'>
                                </asp:Label>
                            </ItemTemplate>
                        </asp:Repeater>
                    </td>
                </tr>
            </itemtemplate>
            <footertemplate>
                </table>
            </footertemplate>
        </asp:Repeater>
    </asp:Panel>
    <asp:Label ID="NotFoundLabel" Visible="false" runat="server" Text="Няма намерени резултати.">
    </asp:Label>
</asp:Content>
